﻿Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        'MsgBox(Application.StartupPath)
        Dim streamPen As New System.IO.StreamWriter(Application.StartupPath & "\123.txt")
        streamPen.WriteLine(RichTextBox1.Text)
        streamPen.Close()
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim streamwer As New System.IO.StreamReader(Application.StartupPath & "\123.txt")
        streamwer.ReadLine(RichTextBox1.Text)
        streamwer.Close()
    End Sub
End Class
